import java.awt.BorderLayout;
import java.io.File;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;


public class XMLTreeFrame extends JPanel {
	
	private XMLTreePanel xmlTreePanel;
	public JPanel topPanel;
	
	public XMLTreeFrame()
	{}
	public void parser(){
		topPanel = new JPanel();
		topPanel.setLayout(new BorderLayout());

	 /*   org.w3c.dom.Document document = null;
		try {
			DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
			DocumentBuilder builder = dbFactory.newDocumentBuilder();
			document =  builder.parse(new File("google_us.xml"));
			((org.w3c.dom.Node) document).normalize();
			
		}
		catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}*/

		 xmlTreePanel = new XMLTreePanel();
		//xmlTreePanel.setDocument(document);
		//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		topPanel.add(xmlTreePanel);
		//add(xmlTreePanel);
		//pack();
		//setTitle("XML Tree Demo");
		//setLocationRelativeTo(null);
		//setVisible(true);

	}
	/*public static void main(String args[])
	{
		java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new newFrame().parser();

            }
        });
	}*/

}
